
import java.util.ArrayList;



public class PrintUtil {
	/**
	 * 打印学生列表
	 * 
	 * @param studentList
	 */
	public static void print(ArrayList<Student> studentList) {
		if (studentList == null || studentList.size() == 0) {
			System.out.println("学生列表为空");
			return;
		}

		System.out.print("ID     姓名         年龄       班级       专业\n");

		for (int i = 0; i < studentList.size(); i++) {
			Student student = studentList.get(i);
			// 输出每一个数捿
			System.out.print(student.getId() + "   ");
			System.out.print(student.getName() + "     ");
			System.out.print(student.getAge() + "   ");
			System.out.print(student.getClassname() + "    ");
			System.out.print(student.getMajor() + "    ");
			System.out.print("\n");
		}

	}

	/**
	 * 打印菜单
	 */
	public static void printMenu() {
		System.out.println("************************");
		System.out.println("***    请输入选择的序号      **");
		System.out.println("******  1 查看学生列表        **");
		System.out.println("******  2 添加学生              **");
		System.out.println("******  3删除学生            **");
		System.out.println("******  4修改学生     **");
		System.out.println("******  5选课             **");
		System.out.println("******  6查看成绩          **");
		System.out.println("******  7退出系统             **");
		System.out.println("************************");
	}
	public static void printCourse(ArrayList<Course>courseList) {
		if(courseList==null||courseList.size()==0) {
			System.out.println("课程列表为空");
			return;
		}
		System.out.print("课程ID   课程名     授课老师\n");
		for(int i=0;i<courseList.size();i++) {
			Course course=courseList.get(i);
			//输出每一个数据
			System.out.print(course.getCoures_id()+" ");
			System.out.print(course.getCoures_name()+" ");
			System.out.print(course.getCoures_teacher()+" ");
			System.out.print("\n");
		}
	}
	public static void printScore(ArrayList<Score>scoreList) {
		if(scoreList==null||scoreList.size()==0) {
			System.out.println("成绩列表为空");
			return;
		}
		System.out.print("姓名   课程名     分数\n");
		for(int i=0;i<scoreList.size();i++) {
			Score score=scoreList.get(i);
			//输出每一个数据
			System.out.print(score.getStuName()+" ");
			System.out.print(score.getCouresName()+" ");
			System.out.print(score.getScore()+" ");
			System.out.print("\n");
		}
	}
}
